# Which compiler
# CC = gcc
# AR = ar
# AT = @

include $(PROJ_ROOT_PATH)/config.mk

OUTPUT = heap_test

# source file
SRCS += main.c
SRCS += comm.c
SRCS += heap_user.c

OBJS = $(patsubst %.c,%.o,$(SRCS))

LIBS += -lheap

# Where are include files kept
INCLUDES += -I$(MIDDLEWARE_PATH)/MemMang

# Option for development
CFLAGS = -g -O2 -Wall -std=gnu99
# Option for release
# CFLAGS = -O -Wall

# CFLAGS += -D$(OS)


$(OUTPUT): $(OBJS)
	$(AT)echo "LIBS: $(LIBS)"
	$(AT)$(CC) $^ -o $(BIN_PATH)$@ $(INCLUDES) $(LIBS) -L$(LIBS_PATH)

$(OBJS):%.o:%.c
	$(AT)$(CC) -c $< $(CFLAGS) $(INCLUDES) -o $@


.PHONY: clean
clean:
	$(AT)-rm -rf $(OBJS)

